﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;
using CFrame.Common;
using CFrame.Manager;

/*
 * 脚本功能：UI基类
 * 编写日期：2018.12.13
 * 编写人：HYZ
 */
namespace CFrame.UI
{
    public abstract class BaseUI:MonoBehaviour
    {
        /// <summary>
        /// UI管理器
        /// </summary>
        protected UIManager uiMng;
        /// <summary>
        /// 游戏调度中心
        /// </summary>
        protected GameMiddle game;

        /// <summary>
        /// UI管理器
        /// </summary>
        public UIManager UIMng
        {
            set
            {
                uiMng = value;
            }
        }

        /// <summary>
        /// 游戏调度中心
        /// </summary>
        public GameMiddle Game
        {
            set
            {
                game = value;
            }
        }

        /// <summary>
        /// 当界面被显示
        /// </summary>
        public abstract void OnEnter();

        /// <summary>
        /// 当界面暂停显示
        /// </summary>
        public abstract void OnPause();

        /// <summary>
        /// 当界面继续显示
        /// </summary>
        public abstract void OnResume();

        /// <summary>
        /// 当界面推出显示
        /// </summary>
        public abstract void OnExit();
    }
}
